package model;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Date;


/**
 * The persistent class for the message database table.
 * 
 */
@Entity
@NamedQuery(name="Message.findAll", query="SELECT m FROM Message m")
public class Message implements Serializable {
	private static final long serialVersionUID = 1L;

	@EmbeddedId
	private MessagePK id;

	private String info;

	private int status;

	@Temporal(TemporalType.DATE)
	private Date time;

	//bi-directional many-to-one association to Tourist
	@ManyToOne
	@JoinColumn(name="t_email",insertable=false, updatable=false)
	private Tourist tourist;

	//bi-directional many-to-one association to View
	@ManyToOne
	@JoinColumn(name="v_name",insertable=false, updatable=false)
	private View view;

	public Message() {
	}

	public MessagePK getId() {
		return this.id;
	}

	public void setId(MessagePK id) {
		this.id = id;
	}

	public String getInfo() {
		return this.info;
	}

	public void setInfo(String info) {
		this.info = info;
	}

	public int getStatus() {
		return this.status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public Date getTime() {
		return this.time;
	}

	public void setTime(Date time) {
		this.time = time;
	}

	public Tourist getTourist() {
		return this.tourist;
	}

	public void setTourist(Tourist tourist) {
		this.tourist = tourist;
	}

	public View getView() {
		return this.view;
	}

	public void setView(View view) {
		this.view = view;
	}

}